/*
 *  ValidationResult.cs
 *  
 *  [Description of the use of this file.]
 *  
 *  Copyright (c) 2009, Richard Bao Labs.
 *  
 *  The contents of this file are subject to the Mozilla Public License
 *  Version 1.1 (the "License"); you may not use this file except in
 *  compliance with the License. You may obtain a copy of the License at
 *  
 *  http://www.mozilla.org/MPL/
 *  
 *  Software distributed under the License is distributed on an "AS IS"
 *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 *  the License for the specific language governing rights and limitations
 *  under the License.
 *  
 *  The Original Code is RichControlLibrary.
 *  
 *  The Initial Developer of the Original Code is Richard Bao Labs.
 *  All Rights Reserved.
 */

using System;
using System.Collections.Generic;
using System.Text;

namespace RichControlLibrary
{
    /// <summary>
    /// Contains the information about the validation result.
    /// </summary>
    public class ValidationResult
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ValidationResult"/> class.
        /// </summary>
        public ValidationResult() { }

        /// <summary>
        /// Initializes a new instance of the <see cref="ValidationResult"/> class by specifiying whether
        /// it is successful.
        /// </summary>
        /// <param name="success">A <see cref="bool"/> value that indicates whether it is successful.</param>
        public ValidationResult(bool success)
            : this(success, null) { }

        /// <summary>
        /// Initializes a new instance of the <see cref="ValidationResult"/> class by specifiying whether
        /// it is successful and the auto corrected text.
        /// </summary>
        /// <param name="success">A <see cref="bool"/> value that indicates whether it is successful.</param>
        /// <param name="autoCorrectedText">The auto corrected text.</param>
        public ValidationResult(bool success, string autoCorrectedText)
        {
            _success = success;
            _autoCorrectedText = autoCorrectedText;
        }

        private bool _success = false;
        /// <summary>
        /// Gets a <see cref="System.Boolean"/> value that indicates whether the validation is 
        /// successful.
        /// </summary>
        public bool Success
        {
            get { return _success; }
            internal set { _success = value; }
        }

        private string _autoCorrectedText = null;
        /// <summary>
        /// Gets the auto corrected text. Null if auto correction is not supported.
        /// </summary>
        public string AutoCorrectedText
        {
            get { return _autoCorrectedText; }
            internal set { _autoCorrectedText = value; }
        }
    }
}
